package com.rstrulak.beans;
import java.io.Serializable;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import com.rstrulak.dao.RoleDao;
@Component("user2")
@Scope("session")
public class UserBean2 implements Serializable {
   /**
	 * 
	 */
	private static final long serialVersionUID = 2057113996369789898L;
private String name;
   private String password;
   
   @Autowired
   RoleDao roleDao;
  

   public String getName() {return"Bean 2 z autowired " +roleDao.getById(1l).getName();}   
   public void setName(String newValue) { name = newValue; }

   public String getPassword() { return password; }
   public void setPassword(String newValue) { password = newValue; }   
}
